Skip to content

ci: normalize text line endings so Biome passes on Windows#349

Merged
Abhash-Chakraborty merged 4 commits into
Abhash-Chakraborty:mainfrom
dchaudhari7177:ci/normalize-line-endings
Jul 12, 2026
Merged

ci: normalize text line endings so Biome passes on Windows#349
Abhash-Chakraborty merged 4 commits into
Abhash-Chakraborty:mainfrom
dchaudhari7177:ci/normalize-line-endings

Conversation

@dchaudhari7177

@dchaudhari7177 dchaudhari7177 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Closes #336

Reproduced

Fresh clone on Windows 11 (core.autocrlf=true, the Git-for-Windows default): pnpm exec biome check .84 errors across 85 files, every hunk a pure removal — matching the issue's evidence, while the same tree is green on Linux.

Change

  • Root .gitattributes* text=auto eol=lf: Git keeps auto-detecting binaries, and every detected text file is pinned to LF in the working tree on all platforms, so checkouts no longer depend on each contributor's autocrlf. Explicit binary markers for the image/font asset types present in the repo (png/webp/ico/icns/woff/woff2) as a safety net.
  • Renormalized exactly six files that had CRLF committed in the repository itself (git add --renormalize .): the PR template, .gitignore, CODE_OF_CONDUCT.md, LICENSE, docker-compose.yml, frontend/Dockerfile. Verified every diff is a symmetric line-ending rewrite (equal insertions/deletions, no content changes). Nothing else in the repo needed it.
  • CONTRIBUTING.md — a short "Line endings (Windows)" note with the one-time re-checkout command for clones that predate the .gitattributes (git rm -rf --cached . && git reset --hard, with a stash-first warning).

Verified on Windows (per the acceptance criteria)

Ran the documented reset on this clone, then:

  • biome check .0 errors (only the 35 warnings Linux CI also has), exit 0
  • git diff --check → clean; git status → no phantom modifications after re-checkout
  • Spot-checked LICENSE and frontend/src/app/layout.tsx bytes: LF only
  • Binary assets untouched (no .png/.webp/.ico in the renormalize set)

Linux behavior is unchanged: committed content was already LF everywhere except the six renormalized files, and eol=lf matches what Linux checkouts already produced.

Summary by CodeRabbit

  • Chores

    • Enforced consistent LF line endings for text files across platforms, while keeping common binary assets exempt from line-ending conversion.
    • Reformatted repository and configuration files (including container setup and Dockerfiles) without changing behavior.
  • Documentation

    • Added Windows line-ending guidance and a remediation command for cached CRLF issues.
    • Normalized formatting in contribution materials, pull request template, code of conduct, and license text.

Note on the GitGuardian flag

The "Generic Password" it detects is POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-find123} in docker-compose.yml — the pre-existing local-dev default that has been on main all along. This PR only rewrote that file's line endings (CRLF→LF, no content change), which made the scanner re-attribute every line to this diff. Nothing new is introduced; if you'd like the default fallback removed, that's a separate change I'm happy to make.

frontend Biome enforces lineEnding lf, but without repository-owned
line-ending rules a Windows clone (core.autocrlf=true default) checks
text files out as CRLF — pnpm check fails with 84 formatting errors that
are pure CR removals while the identical tree is green on Linux.

Add a root .gitattributes: '* text=auto eol=lf' (Git keeps auto-detecting
binaries; detected text is pinned to LF in every working tree regardless
of each contributor's autocrlf), plus explicit binary markers for image
and font assets. Renormalize the six files that had CRLF committed in
the repository itself (.github/pull_request_template.md, .gitignore,
CODE_OF_CONDUCT.md, LICENSE, docker-compose.yml, frontend/Dockerfile) —
every hunk is a line-ending rewrite, no content changes.

Closes Abhash-Chakraborty#336
Copilot AI review requested due to automatic review settings July 11, 2026 07:48
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown

PR Context Summary

  • Linked issue(s): ci: normalize text line endings so Biome passes on Windows #336
  • Referenced but not closing: none
  • PR author trusted by GitHub: no
  • Dependabot PR: no
  • PR assignee synced from linked issue: no change
  • Macroscope review status: Already triggered once for this PR. Use the workflow dispatch to manually rerun.

Suggested issue links

  • No strong issue match found yet.

Use Fixes #123 or Closes #123 in the PR body when one of the suggestions is the intended issue.
Manual rerun: Actions > PR Context Triage > Run workflow > set pr_number and force_review=true.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: abc29c79-d6a6-47d3-afa2-950b427b2f0e

📥 Commits

Reviewing files that changed from the base of the PR and between 03867e6 and c077310.

📒 Files selected for processing (2)
  • docker-compose.yml
  • frontend/Dockerfile
✅ Files skipped from review due to trivial changes (2)
  • frontend/Dockerfile
  • docker-compose.yml

📝 Walkthrough

Walkthrough

Adds repository-wide LF line-ending rules, preserves binary assets, documents Windows checkout recovery, and normalizes formatting across documentation, ignore rules, Docker Compose, and the frontend Dockerfile without changing runtime behavior.

Changes

Line-ending and formatting normalization

Layer / File(s) Summary
Line-ending policy and Windows guidance
.gitattributes, CONTRIBUTING.md
Text files are pinned to LF, common binary assets are excluded from conversion, and Windows remediation steps are documented.
Repository documentation and ignore-file normalization
.github/pull_request_template.md, .gitignore, CODE_OF_CONDUCT.md, LICENSE
Existing content and rules are reformatted with normalized whitespace and line endings.
Container configuration normalization
docker-compose.yml, frontend/Dockerfile
YAML and Dockerfile formatting is normalized without changing services, commands, stages, or runtime settings.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

I’m a bunny with LF in my paws,
Keeping every line in neat applause.
Binary bits stay safely still,
Windows checkouts bend to will.
Docs and Docker hop in tune—
Clean checks shine beneath the moon!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and verification, but omits several required template sections and checklist items. Add the missing template sections: Type of change, What changed, How to test, Checklist, and GSSoC'26 checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: normalizing line endings so Biome passes on Windows.
Linked Issues check ✅ Passed The PR implements the line-ending rules, selective renormalization, docs update, and Windows/Linux verification requested by #336.
Out of Scope Changes check ✅ Passed The remaining edits are line-ending or whitespace normalization plus the CONTRIBUTING note, so no unrelated scope creep is evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitguardian

gitguardian Bot commented Jul 11, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
34345071 Triggered Generic Password 8e7ab62 docker-compose.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 11, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Pure CI/tooling change that adds .gitattributes to enforce LF line endings. The large diff is entirely mechanical CRLF→LF conversion with no actual content or runtime behavior changes.

You can customize Macroscope's approvability policy. Learn more.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the repository’s line-ending behavior consistent across platforms so frontend Biome formatting checks don’t fail on Windows checkouts that default to CRLF, while keeping binary assets safe from any text conversion.

Changes:

  • Add a root .gitattributes that normalizes all detected text files to LF on checkout (* text=auto eol=lf) and explicitly marks common repo binary asset extensions as binary.
  • Renormalize a small set of previously-CRLF-committed files to LF (license/docs/templates/compose/Dockerfile) without semantic changes.
  • Document a one-time re-checkout/reset command in CONTRIBUTING.md for existing Windows clones predating .gitattributes.

Reviewed changes

Copilot reviewed 2 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.gitattributes Enforces LF line endings for text files across platforms; marks key asset extensions as binary to prevent conversion.
CONTRIBUTING.md Adds Windows-specific guidance for fixing pre-existing CRLF checkouts after introducing .gitattributes.
frontend/Dockerfile Renormalized to LF line endings (no functional changes).
docker-compose.yml Renormalized to LF line endings (no functional changes).
LICENSE Renormalized to LF line endings (no content changes).
CODE_OF_CONDUCT.md Renormalized to LF line endings (no content changes).
.gitignore Renormalized to LF line endings (no content changes).
.github/pull_request_template.md Renormalized to LF line endings (no content changes).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CONTRIBUTING.md`:
- Around line 161-168: Update the warning preceding the recovery command in
CONTRIBUTING.md to explicitly state that it discards both staged and unstaged
tracked changes, and adjust the stash/commit guidance accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3cb457e1-6603-4743-9c2b-3e19f43b8b48

📥 Commits

Reviewing files that changed from the base of the PR and between a1c2ee8 and 5121e8d.

📒 Files selected for processing (8)
  • .gitattributes
  • .github/pull_request_template.md
  • .gitignore
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • LICENSE
  • docker-compose.yml
  • frontend/Dockerfile

Comment thread CONTRIBUTING.md
@macroscopeapp macroscopeapp Bot dismissed their stale review July 11, 2026 12:04

Dismissing prior approval to re-evaluate 03867e6

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 11, 2026
@Abhash-Chakraborty Abhash-Chakraborty added bug Something is broken and needs to be fixed. documentation Documentation, README, guide, or text improvement. frontend Frontend UI, state, and Next.js work ci Continuous integration and automation gssoc26 Related to GirlScript Summer of Code 2026. gssoc Related to GirlScript Summer of Code. quality:clean Clean and maintainable PR. GSSoC contributor multiplier: 1.2x. type:bug Bug-fix PR. GSSoC type bonus: +20 points. type:docs Documentation-related PR. GSSoC type bonus: +5 points. type:devops DevOps, CI/CD, deployment, or infrastructure PR. GSSoC type bonus: +15 points. under-review Maintainer needs to verify do-not-merge Blocks merging. Remove this label only when the PR is fully ready for production. labels Jul 11, 2026
@macroscopeapp macroscopeapp Bot dismissed their stale review July 11, 2026 14:24

Dismissing prior approval to re-evaluate 03867e6

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 11, 2026
@Abhash-Chakraborty Abhash-Chakraborty removed under-review Maintainer needs to verify do-not-merge Blocks merging. Remove this label only when the PR is fully ready for production. labels Jul 11, 2026
@Abhash-Chakraborty Abhash-Chakraborty added the ready-to-merge Fully approved, tested, and cleared for immediate merging. label Jul 11, 2026
@macroscopeapp macroscopeapp Bot dismissed their stale review July 11, 2026 14:38

Dismissing prior approval to re-evaluate 03867e6

@github-actions

Copy link
Copy Markdown

@macroscope-app review

Please review this PR against its linked issue, local-first privacy rules, and the current Find repo instructions.
Linked issue(s): #336.
Trigger source: label-gated review (ready-to-merge).

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 11, 2026

@Abhash-Chakraborty Abhash-Chakraborty left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The change is focused, the Windows line-ending issue is properly handled, and the review feedback is addressed.

@macroscopeapp macroscopeapp Bot dismissed their stale review July 11, 2026 16:00

Dismissing prior approval to re-evaluate c077310

@Abhash-Chakraborty Abhash-Chakraborty added the gssoc:approved Valid GSSoC contribution approved for scoring. label Jul 11, 2026
@dchaudhari7177

Copy link
Copy Markdown
Contributor Author

Note on the GitGuardian flag: it's a false positive. The flagged "secret" is POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-find123} in docker-compose.yml — the local-dev default fallback that already exists verbatim on main. This PR's line-ending renormalization (CRLF→LF) rewrote every text file's blob, so the scanner saw the whole file as newly-added and flagged the pre-existing line. No new credential is introduced by this PR.

@Abhash-Chakraborty Abhash-Chakraborty merged commit 5cc9b6b into Abhash-Chakraborty:main Jul 12, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken and needs to be fixed. ci Continuous integration and automation documentation Documentation, README, guide, or text improvement. frontend Frontend UI, state, and Next.js work gssoc:approved Valid GSSoC contribution approved for scoring. gssoc Related to GirlScript Summer of Code. gssoc26 Related to GirlScript Summer of Code 2026. quality:clean Clean and maintainable PR. GSSoC contributor multiplier: 1.2x. ready-to-merge Fully approved, tested, and cleared for immediate merging. type:bug Bug-fix PR. GSSoC type bonus: +20 points. type:devops DevOps, CI/CD, deployment, or infrastructure PR. GSSoC type bonus: +15 points. type:docs Documentation-related PR. GSSoC type bonus: +5 points.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: normalize text line endings so Biome passes on Windows

3 participants